﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace bai_4thuchanh2
{
    class monhoc
    {
        private float tenmonhoc;
        private float tilekiemtra;
        private float diemkiemtra;
        private float diemthi;
        float diemtoan;
        float diemhoa;
        float diemly;
        public monhoc()
        {
        }
        public float TenMonHoc
        {
            get { return tenmonhoc; }
            set { tenmonhoc = value; }
        }
        public float TiLeKiemTra
        {
            get { return tilekiemtra; }
            set { tilekiemtra = value; }
        }
        public float DiemKiemTra
        {
            get { return diemkiemtra; }
            set { diemkiemtra = value; }
        }
        public float DiemThi
        {
            get { return diemkiemtra; }
            set { diemkiemtra = value; }
        }
        public float DiemToan
        {
            get { return diemtoan; }
            set { diemtoan = value; }
        }
        public float DiemHoa
        {
            get { return diemhoa; }
            set { diemhoa = value; }
        }
        public float DiemLy
        {
            get { return diemhoa; }
            set { diemhoa = value; }
        }
        public virtual void nhap()     //nhap 
        {
            Console.Write("nhap ten mon hoc");
            TenMonHoc = float.Parse(Console.ReadLine());
            Console.Write("nhap diem cua mon toan:");
            DiemToan = float.Parse(Console.ReadLine());
            Console.Write(" nhap diem cua mon hoa:");
            DiemHoa=float.Parse(Console.ReadLine());
            DiemHoa = float.Parse(Console.ReadLine());
            Console.Write("nhap diem cua mon ly:");
            DiemLy = float.Parse(Console.ReadLine());
                
            Console.Write(" nhap ti le kiem tra ");
            TiLeKiemTra = float.Parse(Console.ReadLine());
            Console.Write("nhap diem kiem tra");
            DiemKiemTra = float.Parse(Console.ReadLine());
            Console.Write("nhap diemm thi");
            DiemThi = float.Parse(Console.ReadLine());
        }
        public virtual void xuat()
        {
            Console.Write("monhoc:{0},tilekiemtra:{1},diemkiemtra:{2},diemthi:{3}", TenMonHoc, TiLeKiemTra, DiemKiemTra, DiemThi);
           
        }

            
    }
}
